﻿using System;

namespace Database.Sql.Attributes
{
  /// <summary>
  /// Defines the order in which the columns need to be placed into a table valued parameter.
  /// </summary>
  [Obsolete("No longer required. Will be removed in v3. Please update your code base before updating to v3.")]
  [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
  public class TVPColumnOrder : Attribute
  {
    /// <summary>
    /// Gets or sets the column index.
    /// </summary>
    /// <value>Column Index.</value>
    public int Order { get; private set; }

    /// <summary>
    /// Initializes a new instance of the <see cref="TVPColumnOrder"/> class.
    /// </summary>
    /// <param name="order">Column index.</param>
    public TVPColumnOrder(int order = 0)
    {
      Order = order;
    }
  }
}
